﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.ComponentModel.Composition;
using SoundEdge.WinControls;
using System.ComponentModel.Composition.Hosting;
using System.Reflection;
using System.IO;

namespace SoundEdge.Dashboard
{
    //[Export]
    public partial class frmSettings : Form
    {
        //[ImportingConstructor]
        public frmSettings()//[ImportMany] IEnumerable<INAudioDemoPlugin> demos)
        {
            InitializeComponent();

           
            //frmSettings settings = container.GetExportedValue<frmSettings>

            //if (demos.Count() > 0)
            //{
            //    var control = demos.ElementAt(0).CreatePanel();
            //    control.Dock = DockStyle.Fill;
            //    tabOutputSettings.Controls.Add(control);
            //}
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            if (outputDeviceSettingsPanel1.Settings == null)
            {
                return;
            }
            outputDeviceSettingsPanel1.Settings.SaveSettings("settings.xml");
            Configuration.OutputMediaSettings = outputDeviceSettingsPanel1.Settings;
        }
    }
}
